/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
/** 
 * \file
 * \brief Header file storing different connection types.
 * \author Antti Maula <antti.maula@tkk.fi>
 */
#ifndef _TCPHUB_CONNECTIONTYPES_H_
#define _TCPHUB_CONNECTIONTYPES_H_
#include <netinet/ip.h>

/** Information for listening a TCP port.
 * 
 */ 
typedef struct _servertcp 
{
  int port;
  char local_address[ 4*3 + 3*1 + 1];
} TServerTCP;


/** Structure containing information for new connection handling.
 */
typedef struct _servers 
{
  TServerTCP *tcp;    ///< Pointer to TCP servers.
  int serverTCPCount; ///< Number of servers.

} TServers;


typedef struct _clienttcp
{
  char address[255];  ///< Address to connect to.
  int port;           ///< Port to connect to.
} TClientTCP;


typedef struct _clients
{
  TClientTCP *tcp;    ///< Pointer to TCP clients
  int clientTCPCount; ///< Number of clients.

} TClients;


#endif // _TCPHUB_CONNECTIONTYPES_H_
